import  {xsEntity} from '../commentity';

import { Column ,Entity,  OneToMany} from 'typeorm';
import { PartinfoEntity } from './useractive';
import { AddressEntity } from './payAddress';


/**
 * 描述
 */
@Entity()
export class UserEntity extends xsEntity {
    @Column({ comment: '用户名',default:null })
    username: string;
  

    @Column({ comment: '书币',default:0 })
    bookCurrency: number;
  
    @Column({ comment: '密码',default:null  })

    password: string;
    @Column({ comment: '性别',default:null })
    gender: number;
    @Column({ comment: '登录时间' ,default:null})
    lastLoginTime: Date;
    @Column({ comment: '登录ip',default:null })
    lastLoginIp: string;
    
    @Column({ comment: '等级' ,default:0})
    userLevel: number;

 
    @Column({ comment: '昵称',default:'ModifyUserName' })

    nickname: string;
    @Column({ comment: '手机号码' ,default:null})
    mobile: string;
    @Column({ comment: '头像',default:null })
    avatar: string;

    @Column({ comment: '微信Id' ,default:null})
    appOpenid: string;
  
    @Column({ comment: 'signature' ,default:null})
    signature: string;
  
    @Column({ comment: '所属平台' ,default:"0"})
    platform: string;
  
    @Column({ comment: '是否删除' ,default:false})
    deleted: boolean;


    @OneToMany( ()=>PartinfoEntity , PartinfoEntity => PartinfoEntity.user)
    active: PartinfoEntity


    @OneToMany(() =>AddressEntity , AddressEntity => AddressEntity.userid)
    payAddress: AddressEntity;

//   邮箱地址	email
// 收件人名字	shippingFirstName
// 收件人姓氏	shippingLastName
// 送货地址	shippingAddress
// 城市	shippingCity
// 州/省	shippingState
// 国家	shippingCountry
// 邮编	shippingZipCode
// 收件人电话	shippingPhone
// 账单人名字	billingFirstName
// 账单人姓氏	billingLastName
// 账单地址	billingAddress
// 城市	billingCity
// 州/省	billingState
// 国家	billingCountry
// 邮编	billingZipCode
// 电话	billingPhone
// 消费的信用卡卡号	cardNo
// 信用卡背面的cvv	cvv
// 信用卡有效期年份（4位）	expYear
// 信用卡有效期月份（2位）	expMonth


}
